<html>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:view>
	<head>
		<title>MVC - Demo</title>
	</head>
<body>

	<h:form>
		<h3>Enter new user data</h3>
		<table>
			<tr>
				<td>Name</td>
				<td>
					<h:inputText value="#{user.name}" />
				</td>
			</tr>	
			<tr>
				<td>Group</td>
				<td>
					<h:inputText value="#{user.group}" />
				</td>
			</tr>	
			<tr>
				<td>IndexNo</td>
				<td>
					<h:inputText value="#{user.indexNo}" />
				</td>
			</tr>	
			<tr>
				<td>E-mail</td>
				<td>
					<h:inputText value="#{user.email}" />
				</td>
			</tr>	
		</table>
		<p>
			<h:commandButton value="Add User" action="addUser" />
		</p>
	</h:form>
	<hr>
	<h:form>
		<h3>Enter new event data</h3>
		<p style="color:red;">
			<h:outputText value="#{event.errors}" />
		</p>
		<table>
			<tr>
				<td>Event</td>
				<td>
					<h:inputText value="#{event.comment}" />
				</td>
			</tr>	
			<tr>
				<td>Start</td>
				<td>
					<h:inputText value="#{event.startTime}" />
				</td>
			</tr>	
			<tr>
				<td>End</td>
				<td>
					<h:inputText value="#{event.endTime}" />
				</td>
			</tr>	
		</table>
		<p>
			<h:commandButton value="Add Event" action="#{event.addToCalendar}" />
		</p>
		<p>
			<h:commandButton value="Event List" action="EventList" />
		</p>
	</h:form>
</body>
</f:view>
</html>